﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UserCommision.aspx.cs" Inherits="Skyworth.CRM.Web.SystemManagement.UserCommision" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>销售管理平台 | 用户授权</title>
    <link href="../themes/default/style.css" rel="stylesheet" type="text/css" />
    <link href="../themes/css/core.css" rel="stylesheet" type="text/css" />
    <link href="../themes/css/pages.css" rel="stylesheet" type="text/css" />
    <link href="../themes/css/Messagebox.css" rel="stylesheet" type="text/css" />
    <script src="../javascripts/jquery-1.4.4.min.js" type="text/javascript"></script>
     <script src="../javascripts/MessageBox.js" type="text/javascript"></script>
    <script src="../javascripts/jquery.autocomplete.js" type="text/javascript"></script>
    <script src="../javascripts/json2.js" type="text/javascript"></script>
    <style type="text/css">
        html
        {
            overflow-x: hidden;
        }
    </style>
    <script type="text/javascript">
        $().ready(function () {
            $("#btnOk").click(function () {
                var userName = $("#txtUserName").val();
                var userId = $("#txtUserId").val();
                if ("" == userId || "" == userName) {
                    $.Messager.Alert({ Title: '系统消息', Message: "请选择一个合法的用户！", Icon: IconType.Warning });
                    return false;
                }
            })
            $(".tableList table.list tbody tr[class!='tableHeader']").hover(function () { $(this).addClass("hover"); },
                                                    function () { $(this).removeClass("hover"); })
        });
    </script>
</head>
<body style="overflow: auto; display: inline; padding: 1px;">
    <div>
        <form id="form1" runat="server">
        <div>
            <div style="position: absolute; width: 100%; height: 40px; left: 0px; top: 0px;">
                <div class="pageHeader">
                    <div class="searchBar" style="padding: 4px 5px;">
                        <ul>
                            <li style="float: left;"><span>系统模块：</span>
                                <asp:DropDownList ID="ddlModules" runat="server" AppendDataBoundItems="True" 
                                    DataTextField="ModuleName" DataValueField="ModuleID" AutoPostBack="True" 
                                    onselectedindexchanged="ddlModules_SelectedIndexChanged" >
                                </asp:DropDownList>
                            </li>
                            <li style="float: left;"><%--<span>用户名称：</span><asp:TextBox ID="txtUserName" runat="server"
                                CssClass="txt"></asp:TextBox>--%><asp:HiddenField ID="txtUserId" runat="server" />
                            </li>
                            <li style="float: left;padding-left:10px">
                                <div class="buttonActive">
                                    <div class="buttonContent">
                                        <asp:Button ID="btnOk" runat="server" Text="保存" CssClass="serverButton" OnClick="btnOk_Click" />
                                    </div>
                                </div>
                            </li>
                            <li style="float: right;">
                                <span >用户名称：</span>
                                <asp:Label ID="labUserName" runat="server" Text="" style="color:Red; font-size:large; font-weight:bold "></asp:Label>
                            </li>
                           <li style="clear: both" ></li>
                        </ul>
                    </div>
                </div>
            </div>
            <div style="position: absolute; left: 0px; top: 44px; *top: 37px; width: 100%">
                <div class="tableList">
                    <asp:GridView ID="gvModuleView" runat="server" DataKeyNames="ModuleID,pageAuthority" CssClass="list" Width="100%"
                            AllowSorting="True" AutoGenerateColumns="False" OnRowDataBound="ModuleView_RowDataBound" GridLines="None" AlternatingRowStyle-CssClass="trbg" HeaderStyle-CssClass="tableHeader">
                            <Columns>
                                <asp:TemplateField HeaderText="页面名称">
                                    <ItemTemplate>
                                        <asp:Label ID="lab_ID" runat="server" Text='<%# Eval("ModuleID")%>' Style="display: none"></asp:Label>
                                        <asp:Label ID="Label1" runat="server" Text='<%# Eval("ModuleName") %>'></asp:Label>
                                        <%--<asp:Label ID="lab_Verify" runat="server" Text="" Style="display: none"></asp:Label>--%>
                                    </ItemTemplate>
                                    <HeaderStyle Wrap="False" />
                                    <ItemStyle Wrap="False" Width="150px" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="功能列表">
                                    <ItemTemplate>
                                        <asp:CheckBoxList ID="AuthorityList" runat="server" RepeatDirection="Horizontal"
                                            RepeatLayout="Flow">
                                        </asp:CheckBoxList>
                                    </ItemTemplate>
                                </asp:TemplateField>                               
                            </Columns>
                        </asp:GridView>
                </div>
            </div>
        </div>
    </form> </div>
</body>
</html>